From 57a241cd81458b8b886b0247aa21517212f7fb68 Mon Sep 17 00:00:00 2001 From: robertlipe Date: Wed, 17 Jul 2013 01:54:00 +0000 Subject: [PATCH] Use doubles, not floats, internally for html, text, garmin_fit. --- gpsbabel/garmin_fit.cc | 4 ++-- gpsbabel/html.cc | 4 ++-- gpsbabel/text.cc | 4 ++-- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/gpsbabel/garmin_fit.cc b/gpsbabel/garmin_fit.cc index 415d51059..14bc02baa 100644 --- a/gpsbabel/garmin_fit.cc +++ b/gpsbabel/garmin_fit.cc @@ -371,8 +371,8 @@ fit_parse_data(fit_message_def* def, int time_offset) } waypt = waypt_new(); - waypt->latitude = (lat / (float)0x7fffffff) * 180; - waypt->longitude = (lon / (float)0x7fffffff) * 180; + waypt->latitude = (lat / (double)0x7fffffff) * 180; + waypt->longitude = (lon / (double)0x7fffffff) * 180; if (alt != 0xffff) { waypt->altitude = (alt / 5.0) - 500; } diff --git a/gpsbabel/html.cc b/gpsbabel/html.cc index bf039787b..3459b17b7 100644 --- a/gpsbabel/html.cc +++ b/gpsbabel/html.cc @@ -200,8 +200,8 @@ html_disp(const waypoint* wpt) logpart = xml_findfirst(curlog, "groundspeak:log_wpt"); if (logpart) { char* coordstr = NULL; - float lat = 0; - float lon = 0; + double lat = 0; + double lon = 0; coordstr = xml_attribute(logpart, "lat"); if (coordstr) { lat = atof(coordstr); diff --git a/gpsbabel/text.cc b/gpsbabel/text.cc index d05948899..a71baa38c 100644 --- a/gpsbabel/text.cc +++ b/gpsbabel/text.cc @@ -217,8 +217,8 @@ text_disp(const waypoint *wpt) logpart = xml_findfirst(curlog, "groundspeak:log_wpt"); if (logpart) { char *coordstr = NULL; - float lat = 0; - float lon = 0; + double lat = 0; + double lon = 0; coordstr = xml_attribute(logpart, "lat"); if (coordstr) { lat = atof(coordstr); -- 2.30.2